<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;
use common\models\SmsCode;
/* @var $this yii\web\View */
/* @var $model common\models\SmsCode */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="sms-code-form">

    <?php $form = ActiveForm::begin(); ?>

    <?= $form->field($model, 'relation')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'code_type')->dropDownList(SmsCode::itemAlias('code_type')) ?>

    <?= $form->field($model, 'verify_code')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'expiration_time')->textInput() ?>

    <?= $form->field($model, 'is_used')->dropDownList(SmsCode::itemAlias('is_used')) ?>

    <?= $form->field($model, 'error_count')->textInput() ?>

    <?= $form->field($model, 'create_time')->textInput() ?>

    <?= $form->field($model, 'ip')->textInput(['maxlength' => true]) ?>

    <div class="form-group">
        <?= Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
    </div>

    <?php ActiveForm::end(); ?>

</div>
